<template>
	<view>
		<view>
			<view class="inputRow">
			    <View>账号</View>
			    <input type="text" v-model="zcuserName" placeholder="请输入账号" 
			    class="phone_number"></input>
			  </view>
			  <view class="inputRow1">
			    <View>密码</View>
			    <input type="text" password v-model="zcuserPass" 
			    placeholder="请输入密码" class="phone_number"></input>
			  </view>
			  <button class="buttonStyle" type="primary" @click="login">注册</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				zcuserName:"",
				zcuserPass:"",
			}
		},
		methods: {
			login() {
					
				      uni.switchTab({
				        url: '/pages/bookshelf/bookshelf',
				        success: function(res) {
				          
				        },
				        fail: function(res) {
				          console.log(res)
				        },
				        
				      })
				      uni.setStorage({
						  key: 'zcuserName',
						  data: this.zcuserName,
				        
				      })
					  uni.setStorage({
						  key: 'zcuserPass',
						  data: this.zcuserPass,
					  })
				    
				  },
			
		
	},
	}
</script>

<style>
.inputRow{
    margin-top: 50rpx;
    display: flex;
    flex-direction: row;
    padding-bottom: 20rpx;
    
  }
  .inputRow1{
    margin-top: 50rpx;
    display: flex;
    flex-direction: row;
    padding-bottom: 20rpx;
    
  }
  .phone_number{
    margin-left:40rpx;
    border: 1px solid #eee;
  }
 
.buttonStyle{
    margin-top: 50rpx;
  }
</style>
